package com.dingup.api.Util;

import com.dingup.api.bean.response.SelectBean;
import com.dingup.api.enums.StudentCampusEnum;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by wancheng on 2018/9/27.
 */
public class ClassRoomUtil {

    private static String[] shangHaiRooms = {"纽约", "华盛顿", "拉斯维加斯", "哥伦布", "波特兰", "西雅图", "沃斯堡", "丹佛", "帕索", "洛杉矶", "旧金山", "克利夫兰", "奥斯汀"};

    private static String[] nanJingRooms = {"教室A", "教室B", "教室C", "教室D", "教室E", "教室F", "教室G", "教室H", "教室I", "教室J", "1328（大）", "1328（小）"};

    private static String[] beiJingRooms = {"佐乌岛", "蛋糕岛", "鱼人岛", "阿拉巴斯坦岛"};

    public static List<SelectBean> getShangHaiRooms(){
        List<String> shangHai = Arrays.asList(shangHaiRooms);
        List<SelectBean> res = shangHai.stream().map(s->{return new SelectBean(s,s);}).collect(Collectors.toList());
        return res;
    }
    public static List<SelectBean> getNanJingRooms(){
        List<String> nanJing = Arrays.asList(nanJingRooms);
        List<SelectBean> res = nanJing.stream().map(s->{return new SelectBean(s,s);}).collect(Collectors.toList());
        return res;

    }
    public static List<SelectBean> getBeiJingRooms(){
        List<String> beiJing = Arrays.asList(beiJingRooms);
        List<SelectBean> res = beiJing.stream().map(s->{return new SelectBean(s,s);}).collect(Collectors.toList());
        return res;

    }

    public static List<SelectBean> getCampusRooms(StudentCampusEnum campusEnum) {
        List<SelectBean> res = new ArrayList<>();
        switch (campusEnum) {
            case SHANGHAI:
                res = ClassRoomUtil.getShangHaiRooms();
                break;
            case NANJING:
                res = ClassRoomUtil.getNanJingRooms();
                break;
            case YUEDUZU:
                res = ClassRoomUtil.getBeiJingRooms();
                break;
            case SHUXUEZU:
                res = ClassRoomUtil.getBeiJingRooms();
                break;
            default:
                break;
        }
        return res;
    }
}
